<?php
$this->pageTitle = Yii::app()->name;
$this->breadcrumbs=array(
	'采购',
);
include_once('nidMenu.php');
?>
<div style="width:100%; float:left; margin-bottom:10px; text-align:right;">
	<form action="" name="jobForm" id="jobForm" method="get">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="15%" class="td_right"><?php echo $labels['NIDNum']; ?>: </td>
			<td width="35%"><input type="text" name="NIDNum" value="<?php if(isset($search['NIDNum']))echo $search['NIDNum'];?>" id="NIDNum" class="input_size10" /></td>
			<td width="15%" class="td_right"><?php echo $labels['CheckPerson']; ?>: </td>
			<td><input type="text" name="CheckPerson" value="<?php if(isset($search['CheckPerson']))echo $search['CheckPerson'];?>" id="CheckPerson" class="input_size10" /></td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $labels['Category']; ?>: </td>
			<td><input type="text" name="Category" value="<?php if(isset($search['Category']))echo $search['Category'];?>" id="Category" class="input_size10" /></td>
			<td class="td_right"><?php echo $labels['SubCategory']; ?>: </td>
			<td><input type="text" name="SubCategory" value="<?php if(isset($search['SubCategory']))echo $search['SubCategory'];?>" id="SubCategory" class="input_size10" /></td>
		</tr>		
		<tr>
			<td class="td_right"><?php echo $labels['RCMDReason']; ?>: </td>
			<td colspan="3"><input type="text" name="RCMDReason" value="<?php if(isset($search['RCMDReason']))echo $search['RCMDReason'];?>" id="RCMDReason" class="input_size12" /></td>
		</tr>
		<tr>
			<td class="td_right"><?php echo $labels['Date']; ?>: </td>
			<td><input type="text" name="Date" id="Date" value="<?= $search['Date'] ?>" readonly="readonly" style="width:252px;" />
		<img onclick="displayCalendar(document.jobForm.Date,'yyyymmdd',this)" style="cursor:pointer;" width="25" src="images/calendar.png" /></td>		
			<td colspan="2" style="text-align:right;"><a style="margin-right:50px;" href="<?=Yii::app()->createUrl('admin/nidUpdate')?>"><img src="images/add2.png" border="0" /></a><a style="margin-right:50px;" href="<?=Yii::app()->createUrl('admin/nid')?>"><img src="images/shua.png" border="0" /></a><input type="image" src="images/go.png" name="jobSub" id="jobSub" value="Go" /></td>
		</tr>
	</table>		
		<input type="hidden" name="r" value="admin/nid" />
	</form>
</div>
<table cellspacing="0" cellpadding="0" width="100%" class="tbl" style="float:left;">
	<tr class="head">
		<td width="8%"><?php echo $labels['Date']; ?></td>
		<td width="8%"><?php echo $labels['NIDNum']; ?></td>
		<td width="8%"><?php echo $labels['RCMDPerson']; ?></td>
		<td width="20%"><?php echo $labels['Category']; ?></td>
		<td width="20%"><?php echo $labels['SubCategory']; ?></td>		
		<td width="26%"><?php echo $labels['RCMDReason']; ?></td>
		<td width="5%"><?php echo $labels['RCMDLink']; ?></td>
		<td>详情</td>
	</tr>
	<?php
    $i = 0;
    $cssArr = array(0 => 'even', 1 => 'odd', 2 => 'three');
    foreach ($rowTable as $item) {
        $trClass = $cssArr[$i % 3];
        $i++;
        ?>
	<tr class="<?= $trClass ?>">
		<td>
			<?=$item->Date?>
		</td>
		<td style="text-align:center;">
			<?=$item->NIDNum?>
		</td>
		<td style="text-align:center;">
			<?=$item->RCMDPerson?>
		</td>
		<td>
			<?=$item->Category?>
		</td>
		<td>
			<?=$item->SubCategory?>
		</td>		
		<td>
			<?=$item->RCMDReason?>
		</td>
		<td style="text-align:center;">
		<?php
		if($item->RCMDLink){
		?>		
		<a href="<?=Helper::linkFormat($item->RCMDLink)?>" target="_blank">打开</a>
		<?php
		}
		?>
		</td>
		<td style="text-align:center;">
			<a href="<?=Yii::app()->createUrl('admin/nidUpdate',array('index'=>$item->Index))?>">详情</a>
		</td>
	</tr>
	<?php
    }
    ?>
</table>
<div id="pager" align="center">
<?php  
	$this->widget('CLinkPager',array(  
		'header'=>'',  
		'firstPageLabel' => '<<',
		'lastPageLabel' => '>>',
		'prevPageLabel' => '<',
		'nextPageLabel' => '>',
		'pages' => $pages,  
		'maxButtonCount'=>13  
		));  
?>
</div>